const router = require('koa-router')()

router.get('/', async (est, next) => {
  await est.render('index', {
    title: 'Hi Koa2!'
  })
})

router.get('/string', async (est, next) => {
  est.body = 'koa2 str'
})

router.get('/json', async (est, next) => {
  est.body = {
    title: 'koa2 json'
  }
})





module.exports = router
